<?php
if (!defined ('TYPO3_MODE')) 	die ('Access denied.');

$TCA["user_farm_branches_regions"] = array(
	"ctrl" => $TCA["user_farm_branches_regions"]["ctrl"],
	"interface" => array(
		"showRecordFieldList" => "name"
	),
	"feInterface" => $TCA["user_farm_branches_regions"]["feInterface"],
	"columns" => array(
		"name" => array(
			"exclude" => 0,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches_regions.name",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"eval" => "required,trim"
			)
		)
	),
	"types" => array(
		"0" => array(
			"showitem" => "name"
		)
	),
	"palettes" => array (
		"1" => array("showitem" => "")
	)
);

$TCA["user_farm_branches"] = array (
	"ctrl" => $TCA["user_farm_branches"]["ctrl"],
	"interface" => array (
		"showRecordFieldList" => "name,description,leader_id,group_id"
	),
	"feInterface" => $TCA["user_farm_branches"]["feInterface"],
	"columns" => array (
		"name" => Array (		
			"exclude" => 0,		
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farmbranches_branches.name",		
			"config" => Array (
				"type" => "input",
				"size" => "40",	
				"max" => "255",	
				"eval" => "required,trim",
			)
		),
		"description" => Array (		
			"exclude" => 0,		
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farmbranches_branches.description",		
			"config" => Array (
				"type" => "text",
				"cols" => "30",
				"rows" => "5",
			)
		),
		"region_id" => Array(
			"exclude" => 0,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farmbranches_branches.region_id",
			"config" => array(
				"type" => "select",
				"foreign_table" => "user_farm_branches_regions",
				"foreign_table_where" => "ORDER BY user_farm_branches_regions.name",
				"size" => 1,
				"minitems" => 1,
				"maxitems" => 1
			)
		),
		"leader_id" => Array (		
			"exclude" => 1,		
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farmbranches_branches.branch_leader_id",		
			"config" => Array (
				"type" => "select",	
				"foreign_table" => "be_users",	
				"foreign_table_where" => "ORDER BY be_users.uid",	
				"size" => 1,	
				"minitems" => 0,
				"maxitems" => 1,	
				"wizards" => Array(
					"_PADDING" => 2,
					"_VERTICAL" => 1,
					"add" => Array(
						"type" => "script",
						"title" => "Create new record",
						"icon" => "add.gif",
						"params" => Array(
							"table"=>"be_users",
							"pid" => "###CURRENT_PID###",
							"setValue" => "prepend"
						),
						"script" => "wizard_add.php",
					),
				),
			)
		),
		"group_id" => Array (		
			"exclude" => 0,		
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farmbranches_branches.branch_group_id",		
			"config" => Array (
				"type" => "select",	
				"foreign_table" => "be_groups",	
				"foreign_table_where" => "ORDER BY be_groups.uid",	
				"size" => 1,	
				"minitems" => 0,
				"maxitems" => 1,	
				"wizards" => Array(
					"_PADDING" => 2,
					"_VERTICAL" => 1,
					"add" => Array(
						"type" => "script",
						"title" => "Create new record",
						"icon" => "add.gif",
						"params" => Array(
							"table"=>"be_groups",
							"pid" => "###CURRENT_PID###",
							"setValue" => "prepend"
						),
						"script" => "wizard_add.php",
					),
				),
			)
		),
		"zip" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.zip",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 15,
				"eval" => "num,nospace"
			)
		),
		"city" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.city",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 150,
				"eval" => "trim"
			)
		),
		"address" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.address",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim"
			)
		),
		"phone" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.phone",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim"
			)
		),
		"email" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.email",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 50,
				"eval" => "trim"
			)
		),
		"tech_email" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.tech_email",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 50,
				"eval" => "trim"
			)
		),
		"url" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.url",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 20,
				"eval" => "required,trim,alphanum_x"
			)
		),
		"invoice_company" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceCompany",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim"
			)
		),
		"invoice_phones" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoicePhones",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim"
			)
		),
		"invoice_address" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceAddress",
			"config" => array(
				"type" => "text",
				"cols" => 30,
				"rows" => 5,
				"wrap" => "off"
			)
		),
		"invoice_inn" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceInn",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 150,
				"eval" => "trim,num"
			)
		),
		"invoice_kpp" => array (
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceKpp",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 150,
				"eval" => "trim,num"
			)
		),
		"invoice_bik" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceBik",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 150,
				"eval" => "trim,num"
			)
		),
		"invoice_bank_name" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceBankName",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim"
			)
		),
		"invoice_settlement_account" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceSettlementAccount",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim,num"
			)
		),
		"invoice_cor_account" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceCorAccount",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim,num"
			)
		),
		"invoice_director" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceDirector",
			"config" => array(
				"type" => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim"
			)
		),
		"invoice_chief_accountant" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.invoiceChiefAccountant",
			"config" => array(
				'type' => "input",
				"size" => 30,
				"max" => 255,
				"eval" => "trim"
			)
		),
		"delivery" => array(
			"exclude" => 1,
			"label" => "LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.delivery",
			"config" => array(
				"type" => "text",
				"cols" => 30,
				"rows" => 5
			)
		)
	),
	"types" => array (
		"0" => array("showitem" => "--div--;LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.firstTab, name;;;;1-1-1, region_id, description;;;richtext[cut|copy|paste|formatblock|textcolor|bold|italic|underline|left|center|right|orderedlist|unorderedlist|outdent|indent|link|table|image|line|chMode]:rte_transform[mode=ts_css|imgpath=uploads/tx_userfarmbranches/rte/], url;;;;2-2-2, tech_email, --div--;LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.contactTab, zip, city, address, phone, email, --div--;LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.bankTab, invoice_company;;;;3-3-3, invoice_inn, invoice_address, invoice_phones, invoice_director, invoice_chief_accountant, invoice_bank_name;;;;4-4-4, invoice_kpp, invoice_bik, invoice_settlement_account, invoice_cor_account, --div--;LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.deliveryTab, delivery;;;richtext[cut|copy|paste|textcolor|bold|italic|underline|left|center|right|orderedlist|unorderedlist|outdent|indent|link|table|chMode]:rte_transform[mode=ts_css|imgpath=uploads/tx_userfarmbranches/rte/], --div--;LLL:EXT:user_farm_branches/locallang_db.xml:user_farm_branches.secondTab, leader_id, group_id")
	),
	"palettes" => array (
		"1" => array("showitem" => "")
	)
);
?>